<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.ycxy.syt.DBDao"%>
<%@page import="java.sql.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<title>假的华为商城</title>
<meta name="keywords" content="都是假的" />
<meta name="description" content="都是假的" />  <link href="css/vmcss2.css?20130409" rel="stylesheet" type="text/css">
<link href="css/main2.css?20130409" rel="stylesheet" type="text/css">
<script>var imagePath = "http://res.vmallres.com/nwap/20160509/images";</script></head>


<body>

<section class="header-ads" style="display:none;">
	<!-- 20151203-顶部广告图-start -->
	<section class="header-ads-content">
	
		<!-- 20151203-广告图图片区域-start -->
		<div class="header-ads-img"><a target="_self" href="javascript:void(0)"><img src="" /></a></div>
		<!-- 20151203-广告图图片区域-end -->
		
		<!-- 20151203-广告图关闭按钮-start -->
		<div class="header-ads-close">
			<a href="javascript:void(0)javascript:;">关闭</a>
		</div><!-- 20151203-广告图关闭按钮-end -->
		
	</section><!-- 20151203-顶部广告图-start -->
</section>
<div class="index-top">
	<!-- 21030531-头部-start -->
	<header class="header" id="index-header"> <!-- 21030531-logo-start -->
		<section class="logo"> <a id="index-href" href="javascript:void(0)/index"><img id="index-img"
			src="photo/syt_log.png" /> </a> 
		</section>
		<!-- 21030531-logo-end -->
		
		<section class="search"> 
			<a id="indexSearch" href="seek.jsp" onclick="_hmt.push(['_trackEvent', 'click icon3', 'click', '记录【搜索】按钮的点击次数'])"> 
				<input type="text" placeholder="查找商品" /> 
				<em class="icon-search"></em> 
			</a> 
		</section> 
		
		<section class="shortcut">
			<ul>
				<li>
					<a id="indexShoppingCart"
						onclick="_hmt.push(['_trackEvent', 'click icon4', 'click', '记录【购物车】按钮的点击次数'])"
						href="javascript:void(0)/shoppingCart" class="icon-shoppingCart" title="购物车">
					</a>
				</li>
			</ul>
		</section> 
	</header>
	<!-- 21030531-头部-start -->
</div>
<script type="text/javascript">
switch (location.pathname)
{
    case "/huawei":
        document.getElementById("index-href").setAttribute("href", "/huawei");
        document.getElementById("index-img").setAttribute("src", imagePath + "/echannelWap/logo/logo_hw.png");
        break;
    case "/honor":
    	document.getElementById("index-href").setAttribute("href", "/honor");
    	document.getElementById("index-img").setAttribute("src", imagePath + "/echannelWap/logo/logo_honor.png");
        break;
    default:
        break;
}

<%
//首页轮播图的获取
String sql2 = "select title , details from notice;";
DBDao dao1 = new DBDao();
ResultSet res2 = (dao1.queryBySQL(sql2));
%>

</script>
<!-- 21030306-首页轮播图-start -->
<section class="pro-gallery" style="height:15.2em;">
	<div id="slider" class="swiper-container">
    	<ul style="width: 100%;" class="swiper-wrapper">                
        	<% while(res2.next()){ %>
       		<li class="swiper-slide" style="width:100%"><a href="artice.jsp?id=<%= res2.getString(2)%>">
       			<img src="<%= res2.getString(1) %>" /></a></li>
       		<% } %>
       		<% dao1.closeRes(); %>
        </ul>
    </div>
    <nav class="swiper-pagination-white" id="sliderNav"></nav>
</section>
<!-- 21030306-首页轮播图-end -->

<%
//首页焦点图的获取
String sql = "select name , price , imgurl , description  from products;";
DBDao dao2 = new DBDao();
ResultSet res = (dao2.queryBySQL(sql));
 %>
 
<section class="channel-floor channel-floor-list4">

      <ul class="b">
      	<%
      		int i = 0;
	 	  	while(res.next()){
		%>
      <li> <a onclick="_paq.push(['trackLink','点击首页橱窗商品位第<%=i%>项', 'link', '']);" href="artice.jsp?id=<%=res.getString(1) %>"><p class="p-name"><%=res.getString(1) %></p><p class="p-img"><img src="<%=res.getString(3) %>"></p></a>
      </li>
      	<%
      		i++;
      		if( i == 8 )
      			break;
	      	if( i % 4 == 0 ){
	      		%>
	   </ul>
	   <ul class="b">
	      		<%
	      	}
	      	
    	}
    	//dao2.closeRes();
      	%>
      </ul> 
</section>

<!-- 20160106-快捷九宫格导航-start -->
<article class="quicklink">
    <ul class="clearfix">
        <li><a href="undone.html"><i><img src="http://res.vmallres.com/pimages//squaredInfo/icon/20160518/e4802c2e53d8362fad1e6405ebfb5026.jpg" ></i><p>选手机</p></a></li>
        <li><a href="undone.html"><i><img src="http://res.vmallres.com/pimages//squaredInfo/icon/20160511/b9a8083e5a1fe7496a84a9c594a6e149.png" ></i><p>实名特权</p></a></li>
        <li><a href="undone.html"><i><img src="http://res.vmallres.com/pimages//squaredInfo/icon/20160613/6fc224c320a3057c48c5fc667695befe.jpg" ></i><p>以旧换新</p></a></li>
        <li><a href="undone.html"><i><img src="http://res.vmallres.com/pimages//squaredInfo/icon/20160511/0a61c3ae7375024167c5a32b54cb2951.png" ></i><p>充值</p></a></li>
        <li><a href="undone.html"><i><img src="http://res.vmallres.com/pimages//squaredInfo/icon/20160511/53f4fa54879830be979f595abc92d9ac.png" ></i><p>优购码</p></a></li>
    </ul>
</article>
<!-- 20160106-快捷九宫格导航-end -->
<!-- 20160223-公告栏入口-start -->
<section class="channel-notice">
    <div><a href="javascript:void(0)/notice">公告</a></div>
    <div class="swiper-container" id="noticeSlider">
        <i class="icon-notice"></i>
        <ul class="swiper-wrapper">
            <li class="swiper-slide"><a href="artice.jsp?id=小米 6x">小米 6x 初音未来版 新品上市</a></li>
            <li class="swiper-slide"><a href="undone.html">公告2</a></li>
            <li class="swiper-slide"><a href="undone.html">公告3</a></li>
            <li class="swiper-slide"><a href="undone.html">公告4</a></li>
            <li class="swiper-slide"><a href="undone.html">公告5</a></li>
        </ul>
    </div>
</section>

<!-- 20160223-公告栏入口-end -->

<!-- 对称广告图 -->
<section class="channel-floor">
  <div class="hot-area">
    <div class="b">
      <ul>
      	<li><a href="artice.jsp?id=荣耀 play"><img src="photo/荣耀 play lb.jpg" /></a></li>
      	<li><a href="artice.jsp?id=小米 6x"><img src="photo/小米 6x lb.jpg" /></a></li>
      </ul>
    </div>
  </div>
</section>
<!-- 对称广告图 -->

<%
//促销信息的获取
String sql3 = "select name , price , imgurl , description  from products;";
DBDao dao3 = new DBDao();
ResultSet res3 = (dao3.queryBySQL(sql3));
%>

<!--促销商品 update start by dwx285206 20150706-->
<section class="channel-floor">
<article class="recs">
  <header class="h clearfix">
    </header>
    <div class="b">
	 	  	<ul>
	 	  	<%
	 	  	while(res3.next()){
	 	  	 %>
	 	  		<li>
	 	  			<div class="first">
	 	  				<a href='artice.jsp?id=<%=res3.getString(1)%>'>
	 	  					<img src='<%=res3.getString(3) %>'></img>
	 	  					<div class='name'>
	 	  						<h3 class="p-name"><%= res3.getString(1) %></h3>
	              				<p class="p-promotion"><%= res3.getString(4) %></p>
	             				<p class="p-price"><b>&yen; <%=res3.getString(2) %></b></p>
	 	  					</div>
	 	  				</a>
	 	  			</div>
	 	  		</li>
	 	  	<%
	 	  	i++;
	 	  	if(i % 2 == 0){
	 	  	%>
	 	  </ul><ul>
	 	  	<%
	 	  	}
	 	  }
	 	  dao3.closeRes();
	 	  res.close();
	 	  	 %>
	 	  </ul>
	 </div>
</article>
</section>
<!--促销商品 update end by dwx285206 20150706-->
<!--中部轮播图广告--start-->
<section class="pro-gallery" style="height:9em;">
	<div id="middleSlider" class="swiper-container">
    	<ul style="width: 100%;" class="swiper-wrapper">
        	<li style="width:100%;" class="swiper-slide"><a href="https://s1.mi.com/pages/913eb3f7a1d5e28b3f30b2dda4f5569e/index.html">
        	<img src="photo/小米 6x lb.jpg" /></a></li>
      	</ul>
    </div>
    <nav class="swiper-pagination-white" id="middleSliderNav"></nav>
</section>
<!--中部轮播图广告--end-->
<!-- 对称广告图 -->
<section class="channel-floor">
  <div class="hot-area">
    <div class="b">
      <ul>
      	<li><a href="artice.jsp?id=OPPO R15"><img src="photo/OPPO R15 lb.jpg" /></a></li>
      	<li><a href="artice.jsp?id=小米 8"><img src="photo/小米 8 lb.jpg" /></a></li>
      </ul>
    </div>
  </div>
</section>
<!-- 对称广告图 -->
<!--20150706 热销商品 start update by dwx285206 -->
<section class="channel-floor">
<article class="selects">
    <header class="h clearfix">
      <h3 class="title"><span>精品推荐---没有了</span></h3>
    </header>

  </article>
</section>
<!--20150706 热销商品 end update by dwx285206 -->
<!-- 21040522-悬浮工具栏-start -->
<section class="hungBar"> <a href="javascript:void(0)#" class="button-top"><span>返回顶部</span></a> </section>
<!-- 21040522-悬浮工具栏-end -->
<script src="js/ecWap.js?20130605"></script>
<script src="js/base.js?20150415"></script><script src="js/index.js?20130807"></script>
<link rel="stylesheet" href="css/swiper.min.css" >

<script>

	ecWap.index.hasContent = true;

/*增加判断，如果有广告图，请为#index-header重置固定在顶部的距离值。*/
$(document).ready(function() {
	if ((ecWap.cookie.get("adsIndexTopId")
			&& (ecWap.cookie.get("adsIndexTopUpdataDate") == "2018-06-03 14:17:37.0")) || !ecWap.index.hasContent) {
		$('.header-ads').hide();
		$('#index-header').css('top', 0);
	} else {
		$('.header-ads').show();
		$('#index-header').css('top', "5.4em");
	}

	var adsIndexTopId = "39", adsIndexTopUpdataDate = "2016-06-03 14:17:37.0";

	$('.header-ads-close a').click(function() {
		$('.header-ads').hide();
		$('#index-header').css('top', 0);
		ecWap.cookie.set("adsIndexTopId",
			adsIndexTopId, {
				expires : 365,
				path : "/",
				domain : ".vmall.com"
			});
		ecWap.cookie.set("adsIndexTopUpdataDate",
			adsIndexTopUpdataDate, {
				expires : 365,
				path : "/",
				domain : ".vmall.com"
			});
	});
	//走马灯
	var noticeSwiper = new Swiper('#noticeSlider', {
        loop: true,
        direction: 'vertical',
        autoplay: 4000,
        onlyExternal:true,//禁用鼠标或触摸翻页
    });
});	

</script>



<section id ="bottom-area" class="bottom-area">
  <p class="login"> 
  	<a href="login.html" id='loginBtn'></a>
  	<a href="javascript:void(0)javascript:;" onclick='location.href="javascript:void(0)http://club.huawei.com/thread-1144534-1-1.html"'> 反馈</a>
  </p>
  
  <p class="touch"> 
  	<a href="javascript:void(0)/index" class="current"> 触屏版</a>
  	<a href="javascript:void(0)javascript:;" onclick='go2PC();return false;'> 电脑版</a>
  	<a href="javascript:void(0)/app/download"> 客户端</a>
  </p>
  
  <p class="copyright"><span>Copyright &copy; 2011-2016</span></p>
</section>
<script>
$(document).ready(function(){var uri = document.location.pathname;if (null == uri || '' == uri || '/member/exchange' == uri) uri = '/index';if(null != Utils.cookie.get('uid') && '' != Utils.cookie.get('uid')){$('#loginBtn').html('注销').attr('href', '/account/logout?url=' + uri);}else{$('#loginBtn').html('登录').attr('href', 'login.html?url=' + uri);}});
go2PC = function(){Utils.cookie.set('redirectWap', '1', {domain : '.vmall.com'});location.href='http://www.vmall.com/cps/track?cid=12009&url=http://www.vmall.com';};
</script>
<script type="text/javascript"> 
     /*创建于2016-06-14*/ 
     var cpro_id = "u2671677";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/cm.js" type="text/javascript"></script>

</body>
<div class="hr-178"></div>
<div class="actionbar">
  <footer>
    <ul class="clearfix">
      <li class="active" id="index"> <a href="shopp.jsp"><span>首页</span></a></li>
      <li id="购物车"><a href="undone.html"><span>购物车</span></a></li>
      <li id="消息"><a href="undone.html"><span>消息</span></a></li>
      <li id="category"><a href="class.jsp"><span>分类</span></a></li>
      <li id="personal"><a href="undone.html"><span>我的</span></a></li>
    </ul>
  </footer>
</div>
<script type="text/javascript">
document.getElementsByClassName("active")[0].setAttribute("class", "");
if(document.getElementById(location.pathname.split("/")[1]) == null) {
    document.getElementById("index").setAttribute("class", "active");
} else {
    document.getElementById(location.pathname.split("/")[1]).setAttribute("class", "active");
}
</script>
</html>
